/**
 * 
 */
package org.alipay4j.model.base;

import java.io.Serializable;

import com.alibaba.fastjson.JSONObject;

/**
 * 支付宝授权信息
 * @author 贺亮
 */
public class Token implements Serializable{
	/** */
	private static final long serialVersionUID = 8904922759223585929L;
	/** 商户授权令牌 */
	private String app_auth_token;
	/** 授权商户的ID */
	private String user_id;
	/** 授权商户的AppId */
	private String auth_app_id;
	/** 令牌有效期(默认永久有效) */
	private String expires_in;
	/** 刷新令牌有效期(默认永久有效) */
	private String re_expires_in;
	/** 刷新令牌时使用 */
	private String app_refresh_token;
	
	public Token() {
		super();
	}
	
	
	public Token(JSONObject jsonObject) {
		super();
		this.app_auth_token = jsonObject.getString("app_auth_token");
		this.user_id = jsonObject.getString("user_id");
		this.auth_app_id = jsonObject.getString("auth_app_id");
		this.expires_in = jsonObject.getString("expires_in");
		this.re_expires_in = jsonObject.getString("re_expires_in");
		this.app_refresh_token = jsonObject.getString("app_refresh_token");
	}



	public String getAppAuthToken() {
		return app_auth_token;
	}
	public void setAppAuthToken(String appAuthToken) {
		this.app_auth_token = appAuthToken;
	}
	public String getUserId() {
		return user_id;
	}
	public void setUserId(String userId) {
		this.user_id = userId;
	}
	public String getAuthAppId() {
		return auth_app_id;
	}
	public void setAuth_app_id(String auth_app_id) {
		this.auth_app_id = auth_app_id;
	}
	public String getExpires_in() {
		return expires_in;
	}
	public void setExpires_in(String expires_in) {
		this.expires_in = expires_in;
	}
	public String getRe_expires_in() {
		return re_expires_in;
	}
	public void setRe_expires_in(String re_expires_in) {
		this.re_expires_in = re_expires_in;
	}
	public String getApp_refresh_token() {
		return app_refresh_token;
	}
	public void setApp_refresh_token(String app_refresh_token) {
		this.app_refresh_token = app_refresh_token;
	}
	
}
